1. Field of the Invention
The present invention generally relates to operating system management of virtual address space and physical address space, and more particularly to coordination of the sharing of address space between computer processes.
2. Description of Background Art
The manner in which the computing resources of a computer system are managed by an operating system may have a significant impact on the performance levels of various application programs. The performance levels will be observable by those using the application programs. An example class of application programs where management of the computing resources is important has programs that provide access to remote users. The class of application programs includes the well known programs httpd (hyper-text transport protocol daemon), CGI (common gateway interface) scripts, ftpd (file transport protocol daemon), terminal sessions, etc. The operating system must allocate processor time and memory space between the application programs.
Because the nature of each application program in this class of application programs is that multiple users execute the same application program, various approaches have been tried to efficiently allocate the computer system resources between the multiple users executing the same application program. Dedicated processes, multi-threading, and reusable processes are three such approaches.
The approach having dedicated processes has a dedicated process for each user of the application program. Each process has executable code, data, and stack information contained in a dedicated virtual address space, and each process has code executed and data manipulated in dedicated physical address space. The drawback to dedicated processes is that they are relatively expensive to manage in terms of processor and memory resources.
Creating, context switching, and deleting computer processes is expensive in terms of the time spent by a computer operating system in performing these functions. To create a process, virtual address space must be allocated and physical memory space must be mapped; to switch to another process, physical memory space must be remapped to execute the other process; and when a process is finished, the virtual address space must be freed for other processes.
The approach having reusable processes has a fixed number of processes which are available to process user tasks. A user initiated task is queued until a process becomes available to perform the task. The reusable process approach eliminates having to create and destroy a process after a task is complete. However, context switching is as expensive as with dedicated processes, and additional programming is required to manage the task queue. In addition, each process will have to be programmed to initialize and destroy data for performing each request.
The multi-thread approach has multiple threads of program execution in a shared address space. A predetermined number of threads are permitted where there is a thread for each user initiated task. The multi-thread approach is advantageous because there is low overhead in initiating a thread, switching between threads of execution, and destroying a thread. However, for an existing application program which is not multi-threaded, conversion to a multi-threaded application program requires additional programming to separate private data of a thread from data shared between threads, and to program locks for the shared data.
Therefore, it would be desirable to have a system that reduces the overhead involved in running a computer program which may be initiated by multiple users without requiring extensive additional programming for the application.